home *** CD-ROM | disk | FTP | other *** search
- AUTOMATON*
-
- Anneal
-
- This is a simple two-state automaton devised by Gerard Vichniac.
- The Moore neighbourhood is used. If a cell has 6 or more neigbours
- (counting itself) of one type then it becomes that type; otherwise it has 4
- of one type & 5 of the other & takes on the state of the 4 neighbours.
- This is started from a random soup. Try windows 200x100 & 50x40.
-
-
- INITIALISATION*
-
- 10DEF PROCdo
- 20*SetEval wrap on
- 30*SetEval c 22
- 40ENDPROC
-
- SCREEN*
-
- 10DEF PROCdo
- 20DIM buf% 256:SYS "OS_ReadVarVal","c",buf%,256
- 30PROCsoup(!buf%,1,.5)
- 40ENDPROC
-
- CODE*
-
- ( READ_NEIG
- SUM_ALL
- DUP [4*<c>] < IF (0 ==)
- DUP [5*<c>] > IF (<c> ==)
- [4*<c>] = IF (<c> ==)
- 0 == )
-
- END*